<template>
  <div style="box-sizing: border-box; padding-bottom: 3px;" v-if="list.length > 0">
    <el-radio-group size="small" :model-value="modelValue"  @change="change">
      <el-radio-button :label="item.id" v-for="(item,index) in list" :key="index">{{ item.name }}</el-radio-button>
    </el-radio-group>
  </div>
</template>
<script>
export default {
  props: {
    list: {type: Array, default: () => { return [] }},
    size: {type: String, default: 'default'},
    modelValue: {type: String, default: ''}
  },
  data () {
    return {

    }
  },
  emits: ['update:modelValue', 'changeTab'],
  methods: {
    change (val) {
      this.$emit('update:modelValue', val)
      this.$emit('changeTab', val)
    },
  },
}
</script>
<style lang="scss">
.el-tabs__header {
  margin: 0 !important;
}
</style>